package com.jiesen.base.modules.certificate.jsUser.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jiesen.base.baseDao.BaseServiceImpl;
import com.jiesen.base.modules.certificate.jsUser.mapper.JsUserDetailMapper;
import com.jiesen.base.modules.certificate.jsUser.mapper.JsUserMapper;
import com.jiesen.base.modules.certificate.jsUser.model.JsUserDetail;
import com.jiesen.base.modules.certificate.jsUser.service.IJsUserDetailService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bao
 */
@Service
public class JsUserDetailServiceImpl extends BaseServiceImpl<JsUserDetailMapper, JsUserDetail> implements IJsUserDetailService {

    @Override
    public JsUserDetail findUserDetailByMainId(String id) {
        QueryWrapper<JsUserDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_main_id", id);
        JsUserDetail jsUserDetail = baseMapper.selectList(queryWrapper).get(0);
        return jsUserDetail;
    }
}
